MongoDB Physical Model

Schema for:

Model name: Online Course Model
Author:
Version:
File name: align.json
File path: G:\Other computers\Peter Anh\HSU\2133\Project A\db_diagram_commits\align.json
Printed On: Sun Jun 12 2022 17:59:11 GMT+0700 (Indochina Time)
Created with: Hackolade - Polyglot data modeling for NoSQL databases, storage formats, REST APIs, and JSON in RDBMS
1. ER Diagram Views
1.1 Diagram Online Course
1.1.1 Online Course Entity Relationship Diagram
1.1.2 Online Course Graph Diagram
2. Databases
2.1 Database online_course
2.1.1 online_course Properties
PropertyValue
Database nameonline_course
Technical name
Activatedtrue
Enable sharding
Description
Comments
2.1.2 online_course Collections
2.1.2.1 Collection categories
2.1.2.1.1 categories Tree Diagram
2.1.2.1.2 categories Properties
PropertyValue
Collection namecategories
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.1.3 categories Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
namestringtrue
slugstringtrue
parentobjectIdfalsefk
statusstringtrue
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.1.3.1 Field _id
2.1.2.1.3.1.1 _id Tree Diagram
2.1.2.1.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.1.3.2 Field name
2.1.2.1.3.2.1 name Tree Diagram
2.1.2.1.3.2.2 name properties
PropertyValue
Name name
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.1.3.3 Field slug
2.1.2.1.3.3.1 slug Tree Diagram
2.1.2.1.3.3.2 slug properties
PropertyValue
Name slug
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.1.3.4 Field parent
2.1.2.1.3.4.1 parent Tree Diagram
2.1.2.1.3.4.2 parent properties
PropertyValue
Name parent
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection categories
Foreign field _id
Relationship type Foreign Key
Relationship name fk categories. to categories.
Cardinality 1
Default
Sample
Comments
2.1.2.1.3.5 Field status
2.1.2.1.3.5.1 status Tree Diagram
2.1.2.1.3.5.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.1.3.6 Field history
2.1.2.1.3.6.1 history Tree Diagram
2.1.2.1.3.6.2 history Hierarchy
Parent field: categories
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.1.3.6.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.1.3.7 Field createdAt
2.1.2.1.3.7.1 createdAt Tree Diagram
2.1.2.1.3.7.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.1.3.8 Field createdBy
2.1.2.1.3.8.1 createdBy Tree Diagram
2.1.2.1.3.8.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.1.3.9 Field updatedAt
2.1.2.1.3.9.1 updatedAt Tree Diagram
2.1.2.1.3.9.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.1.3.10 Field updatedBy
2.1.2.1.3.10.1 updatedBy Tree Diagram
2.1.2.1.3.10.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.1.4 categories JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "categories",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "name": {
            "type": "string"
        },
        "slug": {
            "type": "string"
        },
        "parent": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "status": {
            "type": "string"
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "name",
        "slug",
        "status",
        "history"
    ]
}
2.1.2.1.5 categories JSON data
{
    "_id": ObjectId("279c1f0cd3afbc5ea118ecb8"),
    "name": "Lorem",
    "slug": "Lorem",
    "parent": ObjectId("3a791abeed390cca12e9a59c"),
    "status": "Lorem",
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("450edb1ecdaf3046bc573965"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("f76f5dcabbcaba1be5f8209e")
    }
}
2.1.2.1.6 categories Target Script
use online_course;

db.createCollection("categories", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "categories",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "name": {
                    "bsonType": "string"
                },
                "slug": {
                    "bsonType": "string"
                },
                "parent": {
                    "bsonType": "objectId"
                },
                "status": {
                    "bsonType": "string"
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "name",
                "slug",
                "status",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.2 Collection comments
2.1.2.2.1 comments Tree Diagram
2.1.2.2.2 comments Properties
PropertyValue
Collection namecomments
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.2.3 comments Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
courseobjectIdtruefk
unitobjectIdtrue
parentobjectIdfalsefk
contentstringtrue
userobjectIdtruefk
timestampsdocumenttrue
createdAtdatetrue
updatedAtdatefalse
2.1.2.2.3.1 Field _id
2.1.2.2.3.1.1 _id Tree Diagram
2.1.2.2.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.2.3.2 Field course
2.1.2.2.3.2.1 course Tree Diagram
2.1.2.2.3.2.2 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.2.3.3 Field unit
2.1.2.2.3.3.1 unit Tree Diagram
2.1.2.2.3.3.2 unit properties
PropertyValue
Name unit
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.2.3.4 Field parent
2.1.2.2.3.4.1 parent Tree Diagram
2.1.2.2.3.4.2 parent properties
PropertyValue
Name parent
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection comments
Foreign field _id
Relationship type Foreign Key
Relationship name fk comments. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.2.3.5 Field content
2.1.2.2.3.5.1 content Tree Diagram
2.1.2.2.3.5.2 content properties
PropertyValue
Name content
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.2.3.6 Field user
2.1.2.2.3.6.1 user Tree Diagram
2.1.2.2.3.6.2 user properties
PropertyValue
Name user
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.2.3.7 Field timestamps
2.1.2.2.3.7.1 timestamps Tree Diagram
2.1.2.2.3.7.2 timestamps Hierarchy
Parent field: comments
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
updatedAtdatefalse
2.1.2.2.3.7.3 timestamps properties
PropertyValue
Name timestamps
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.2.3.8 Field createdAt
2.1.2.2.3.8.1 createdAt Tree Diagram
2.1.2.2.3.8.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.2.3.9 Field updatedAt
2.1.2.2.3.9.1 updatedAt Tree Diagram
2.1.2.2.3.9.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.2.4 comments JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "comments",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "course": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "unit": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "parent": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "content": {
            "type": "string"
        },
        "user": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "timestamps": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "course",
        "unit",
        "content",
        "user",
        "timestamps"
    ]
}
2.1.2.2.5 comments JSON data
{
    "_id": ObjectId("dcc7ffb903f5c358ca7adcad"),
    "course": ObjectId("ab6d9dca1bbdde7643fdd7a5"),
    "unit": ObjectId("f74479b9c41da0841fcfee40"),
    "parent": ObjectId("b7efef18de2cfd06aaa2d169"),
    "content": "Lorem",
    "user": ObjectId("cfbd2dacccb5efcee1b81e44"),
    "timestamps": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z")
    }
}
2.1.2.2.6 comments Target Script
use online_course;

db.createCollection("comments", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "comments",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "course": {
                    "bsonType": "objectId"
                },
                "unit": {
                    "bsonType": "objectId"
                },
                "parent": {
                    "bsonType": "objectId"
                },
                "content": {
                    "bsonType": "string"
                },
                "user": {
                    "bsonType": "objectId"
                },
                "timestamps": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "course",
                "unit",
                "content",
                "user",
                "timestamps"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.3 Collection configurations
2.1.2.3.1 configurations Tree Diagram
2.1.2.3.2 configurations Properties
PropertyValue
Collection nameconfigurations
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.3.3 configurations Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
coursedocumenttrue
priceTiersarraytrue
[0]stringfalse
moneydocumenttrue
instructorCommissionnumerictrue
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.3.3.1 Field _id
2.1.2.3.3.1.1 _id Tree Diagram
2.1.2.3.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.3.3.2 Field course
2.1.2.3.3.2.1 course Tree Diagram
2.1.2.3.3.2.2 course Hierarchy
Parent field: configurations
Child field(s):
FieldTypeReqKeyDescriptionComments
priceTiersarraytrue
2.1.2.3.3.2.3 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.3.3.3 Field priceTiers
2.1.2.3.3.3.1 priceTiers Tree Diagram
2.1.2.3.3.3.2 priceTiers Hierarchy
Parent field: course
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.3.3.3.3 priceTiers properties
PropertyValue
Name priceTiers
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.3.3.4 Field [0]
2.1.2.3.3.4.1 [0] Tree Diagram
2.1.2.3.3.4.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.3.3.5 Field money
2.1.2.3.3.5.1 money Tree Diagram
2.1.2.3.3.5.2 money Hierarchy
Parent field: configurations
Child field(s):
FieldTypeReqKeyDescriptionComments
instructorCommissionnumerictrue
2.1.2.3.3.5.3 money properties
PropertyValue
Name money
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.3.3.6 Field instructorCommission
2.1.2.3.3.6.1 instructorCommission Tree Diagram
2.1.2.3.3.6.2 instructorCommission properties
PropertyValue
Name instructorCommission
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.3.3.7 Field history
2.1.2.3.3.7.1 history Tree Diagram
2.1.2.3.3.7.2 history Hierarchy
Parent field: configurations
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.3.3.7.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.3.3.8 Field createdAt
2.1.2.3.3.8.1 createdAt Tree Diagram
2.1.2.3.3.8.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.3.3.9 Field createdBy
2.1.2.3.3.9.1 createdBy Tree Diagram
2.1.2.3.3.9.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.3.3.10 Field updatedAt
2.1.2.3.3.10.1 updatedAt Tree Diagram
2.1.2.3.3.10.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.3.3.11 Field updatedBy
2.1.2.3.3.11.1 updatedBy Tree Diagram
2.1.2.3.3.11.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.3.4 configurations JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "configurations",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "course": {
            "type": "object",
            "properties": {
                "priceTiers": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": false,
            "required": [
                "priceTiers"
            ]
        },
        "money": {
            "type": "object",
            "properties": {
                "instructorCommission": {
                    "type": "number"
                }
            },
            "additionalProperties": false,
            "required": [
                "instructorCommission"
            ]
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "course",
        "money",
        "history"
    ]
}
2.1.2.3.5 configurations JSON data
{
    "_id": ObjectId("3fcc0845ca6abed9fe5dff2f"),
    "course": {
        "priceTiers": [
            "Lorem"
        ]
    },
    "money": {
        "instructorCommission": 87
    },
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("ed84e5e0ba23815bae6de6c0"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("cda93729e4512d7dcfd9b5d1")
    }
}
2.1.2.3.6 configurations Target Script
use online_course;

db.createCollection("configurations", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "configurations",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "course": {
                    "bsonType": "object",
                    "properties": {
                        "priceTiers": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "string"
                            }
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "priceTiers"
                    ]
                },
                "money": {
                    "bsonType": "object",
                    "properties": {
                        "instructorCommission": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "instructorCommission"
                    ]
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "course",
                "money",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.4 Collection courses
2.1.2.4.1 courses Tree Diagram
2.1.2.4.2 courses Properties
PropertyValue
Collection namecourses
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.4.3 courses Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
statusstringtrue
categoriesarrayfalse
[0]objectIdfalsefk
basicInfodocumentfalse
titlestringtrue
slugstringfalse
subtitlestringfalse
pricenumericfalse
lanstringfalse
levelstringfalse
currencystringfalse
isFreebooleanfalse
discountnumericfalse
imagestringfalse
detailsdocumentfalse
requirementsarrayfalse
[0]stringfalse
objectivesarrayfalse
[0]stringfalse
sectionsarrayfalse
[0]documentfalse
titlestringfalse
objectivestringfalse
numLecturesnumericfalse
durationnumericfalse
unitsarrayfalse
[0]documentfalse
lectureobjectIdfalsefk
quizobjectIdfalsefk
typestringfalse
descriptionstringfalse
suitableLearnerarrayfalse
[0]stringfalse
metadocumentfalse
studentCountnumericfalse
avgRatingScorenumericfalse
ratingCountnumericfalse
contentVideoLengthnumericfalse
messagesdocumentfalse
welcomestringfalse
congratulationstringfalse
promotionsdocumentfalse
enabledbooleanfalse
discountPricenumericfalse
startAtdatefalse
endAtdatefalse
historydocumenttrue
publishedAtstringfalse
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.4.3.1 Field _id
2.1.2.4.3.1.1 _id Tree Diagram
2.1.2.4.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.4.3.2 Field status
2.1.2.4.3.2.1 status Tree Diagram
2.1.2.4.3.2.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.3 Field categories
2.1.2.4.3.3.1 categories Tree Diagram
2.1.2.4.3.3.2 categories Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalse
2.1.2.4.3.3.3 categories properties
PropertyValue
Name categories
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.4 Field [0]
2.1.2.4.3.4.1 [0] Tree Diagram
2.1.2.4.3.4.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Primary key
Foreign collection categories
Foreign field _id
Relationship type Foreign Key
Relationship name fk categories. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.4.3.5 Field basicInfo
2.1.2.4.3.5.1 basicInfo Tree Diagram
2.1.2.4.3.5.2 basicInfo Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
titlestringtrue
slugstringfalse
subtitlestringfalse
pricenumericfalse
lanstringfalse
levelstringfalse
currencystringfalse
isFreebooleanfalse
discountnumericfalse
imagestringfalse
2.1.2.4.3.5.3 basicInfo properties
PropertyValue
Name basicInfo
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.6 Field title
2.1.2.4.3.6.1 title Tree Diagram
2.1.2.4.3.6.2 title properties
PropertyValue
Name title
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.7 Field slug
2.1.2.4.3.7.1 slug Tree Diagram
2.1.2.4.3.7.2 slug properties
PropertyValue
Name slug
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required false
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.8 Field subtitle
2.1.2.4.3.8.1 subtitle Tree Diagram
2.1.2.4.3.8.2 subtitle properties
PropertyValue
Name subtitle
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.9 Field price
2.1.2.4.3.9.1 price Tree Diagram
2.1.2.4.3.9.2 price properties
PropertyValue
Name price
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.10 Field lan
2.1.2.4.3.10.1 lan Tree Diagram
2.1.2.4.3.10.2 lan properties
PropertyValue
Name lan
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.11 Field level
2.1.2.4.3.11.1 level Tree Diagram
2.1.2.4.3.11.2 level properties
PropertyValue
Name level
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.12 Field currency
2.1.2.4.3.12.1 currency Tree Diagram
2.1.2.4.3.12.2 currency properties
PropertyValue
Name currency
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.13 Field isFree
2.1.2.4.3.13.1 isFree Tree Diagram
2.1.2.4.3.13.2 isFree properties
PropertyValue
Name isFree
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default false
Sample
Comments
2.1.2.4.3.14 Field discount
2.1.2.4.3.14.1 discount Tree Diagram
2.1.2.4.3.14.2 discount properties
PropertyValue
Name discount
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.15 Field image
2.1.2.4.3.15.1 image Tree Diagram
2.1.2.4.3.15.2 image properties
PropertyValue
Name image
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.16 Field details
2.1.2.4.3.16.1 details Tree Diagram
2.1.2.4.3.16.2 details Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
requirementsarrayfalse
objectivesarrayfalse
sectionsarrayfalse
descriptionstringfalse
suitableLearnerarrayfalse
2.1.2.4.3.16.3 details properties
PropertyValue
Name details
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.17 Field requirements
2.1.2.4.3.17.1 requirements Tree Diagram
2.1.2.4.3.17.2 requirements Hierarchy
Parent field: details
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.4.3.17.3 requirements properties
PropertyValue
Name requirements
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.18 Field [0]
2.1.2.4.3.18.1 [0] Tree Diagram
2.1.2.4.3.18.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.19 Field objectives
2.1.2.4.3.19.1 objectives Tree Diagram
2.1.2.4.3.19.2 objectives Hierarchy
Parent field: details
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.4.3.19.3 objectives properties
PropertyValue
Name objectives
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.20 Field [0]
2.1.2.4.3.20.1 [0] Tree Diagram
2.1.2.4.3.20.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.21 Field sections
2.1.2.4.3.21.1 sections Tree Diagram
2.1.2.4.3.21.2 sections Hierarchy
Parent field: details
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.4.3.21.3 sections properties
PropertyValue
Name sections
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.22 Field [0]
2.1.2.4.3.22.1 [0] Tree Diagram
2.1.2.4.3.22.2 [0] Hierarchy
Parent field: sections
Child field(s):
FieldTypeReqKeyDescriptionComments
titlestringfalse
objectivestringfalse
numLecturesnumericfalse
durationnumericfalse
unitsarrayfalse
2.1.2.4.3.22.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.23 Field title
2.1.2.4.3.23.1 title Tree Diagram
2.1.2.4.3.23.2 title properties
PropertyValue
Name title
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.24 Field objective
2.1.2.4.3.24.1 objective Tree Diagram
2.1.2.4.3.24.2 objective properties
PropertyValue
Name objective
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.25 Field numLectures
2.1.2.4.3.25.1 numLectures Tree Diagram
2.1.2.4.3.25.2 numLectures properties
PropertyValue
Name numLectures
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.26 Field duration
2.1.2.4.3.26.1 duration Tree Diagram
2.1.2.4.3.26.2 duration properties
PropertyValue
Name duration
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.27 Field units
2.1.2.4.3.27.1 units Tree Diagram
2.1.2.4.3.27.2 units Hierarchy
Parent field: [0]
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.4.3.27.3 units properties
PropertyValue
Name units
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.28 Field [0]
2.1.2.4.3.28.1 [0] Tree Diagram
2.1.2.4.3.28.2 [0] Hierarchy
Parent field: units
Child field(s):
FieldTypeReqKeyDescriptionComments
lectureobjectIdfalse
quizobjectIdfalse
typestringfalse
2.1.2.4.3.28.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.29 Field lecture
2.1.2.4.3.29.1 lecture Tree Diagram
2.1.2.4.3.29.2 lecture properties
PropertyValue
Name lecture
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection lectures
Foreign field _id
Relationship type Foreign Key
Relationship name fk lectures. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.4.3.30 Field quiz
2.1.2.4.3.30.1 quiz Tree Diagram
2.1.2.4.3.30.2 quiz properties
PropertyValue
Name quiz
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection quizzes
Foreign field _id
Relationship type Foreign Key
Relationship name fk quizzes. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.4.3.31 Field type
2.1.2.4.3.31.1 type Tree Diagram
2.1.2.4.3.31.2 type properties
PropertyValue
Name type
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.32 Field description
2.1.2.4.3.32.1 description Tree Diagram
2.1.2.4.3.32.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.33 Field suitableLearner
2.1.2.4.3.33.1 suitableLearner Tree Diagram
2.1.2.4.3.33.2 suitableLearner Hierarchy
Parent field: details
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.4.3.33.3 suitableLearner properties
PropertyValue
Name suitableLearner
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.4.3.34 Field [0]
2.1.2.4.3.34.1 [0] Tree Diagram
2.1.2.4.3.34.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.35 Field meta
2.1.2.4.3.35.1 meta Tree Diagram
2.1.2.4.3.35.2 meta Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
studentCountnumericfalse
avgRatingScorenumericfalse
ratingCountnumericfalse
contentVideoLengthnumericfalse
2.1.2.4.3.35.3 meta properties
PropertyValue
Name meta
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.36 Field studentCount
2.1.2.4.3.36.1 studentCount Tree Diagram
2.1.2.4.3.36.2 studentCount properties
PropertyValue
Name studentCount
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.37 Field avgRatingScore
2.1.2.4.3.37.1 avgRatingScore Tree Diagram
2.1.2.4.3.37.2 avgRatingScore properties
PropertyValue
Name avgRatingScore
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.38 Field ratingCount
2.1.2.4.3.38.1 ratingCount Tree Diagram
2.1.2.4.3.38.2 ratingCount properties
PropertyValue
Name ratingCount
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.39 Field contentVideoLength
2.1.2.4.3.39.1 contentVideoLength Tree Diagram
2.1.2.4.3.39.2 contentVideoLength properties
PropertyValue
Name contentVideoLength
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.40 Field messages
2.1.2.4.3.40.1 messages Tree Diagram
2.1.2.4.3.40.2 messages Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
welcomestringfalse
congratulationstringfalse
2.1.2.4.3.40.3 messages properties
PropertyValue
Name messages
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.41 Field welcome
2.1.2.4.3.41.1 welcome Tree Diagram
2.1.2.4.3.41.2 welcome properties
PropertyValue
Name welcome
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.42 Field congratulation
2.1.2.4.3.42.1 congratulation Tree Diagram
2.1.2.4.3.42.2 congratulation properties
PropertyValue
Name congratulation
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.43 Field promotions
2.1.2.4.3.43.1 promotions Tree Diagram
2.1.2.4.3.43.2 promotions Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
enabledbooleanfalse
discountPricenumericfalse
startAtdatefalse
endAtdatefalse
2.1.2.4.3.43.3 promotions properties
PropertyValue
Name promotions
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.44 Field enabled
2.1.2.4.3.44.1 enabled Tree Diagram
2.1.2.4.3.44.2 enabled properties
PropertyValue
Name enabled
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.4.3.45 Field discountPrice
2.1.2.4.3.45.1 discountPrice Tree Diagram
2.1.2.4.3.45.2 discountPrice properties
PropertyValue
Name discountPrice
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.4.3.46 Field startAt
2.1.2.4.3.46.1 startAt Tree Diagram
2.1.2.4.3.46.2 startAt properties
PropertyValue
Name startAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.4.3.47 Field endAt
2.1.2.4.3.47.1 endAt Tree Diagram
2.1.2.4.3.47.2 endAt properties
PropertyValue
Name endAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.4.3.48 Field history
2.1.2.4.3.48.1 history Tree Diagram
2.1.2.4.3.48.2 history Hierarchy
Parent field: courses
Child field(s):
FieldTypeReqKeyDescriptionComments
publishedAtstringfalse
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.4.3.48.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.4.3.49 Field publishedAt
2.1.2.4.3.49.1 publishedAt Tree Diagram
2.1.2.4.3.49.2 publishedAt properties
PropertyValue
Name publishedAt
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.4.3.50 Field createdAt
2.1.2.4.3.50.1 createdAt Tree Diagram
2.1.2.4.3.50.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.4.3.51 Field createdBy
2.1.2.4.3.51.1 createdBy Tree Diagram
2.1.2.4.3.51.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.4.3.52 Field updatedAt
2.1.2.4.3.52.1 updatedAt Tree Diagram
2.1.2.4.3.52.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.4.3.53 Field updatedBy
2.1.2.4.3.53.1 updatedBy Tree Diagram
2.1.2.4.3.53.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.4.4 courses JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "courses",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "status": {
            "type": "string"
        },
        "categories": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
            }
        },
        "basicInfo": {
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "slug": {
                    "type": "string"
                },
                "subtitle": {
                    "type": "string"
                },
                "price": {
                    "type": "number"
                },
                "lan": {
                    "type": "string"
                },
                "level": {
                    "type": "string"
                },
                "currency": {
                    "type": "string"
                },
                "isFree": {
                    "type": "boolean",
                    "default": false
                },
                "discount": {
                    "type": "number"
                },
                "image": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "title"
            ]
        },
        "details": {
            "type": "object",
            "properties": {
                "requirements": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "string"
                    }
                },
                "objectives": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "string"
                    }
                },
                "sections": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "object",
                        "properties": {
                            "title": {
                                "type": "string"
                            },
                            "objective": {
                                "type": "string"
                            },
                            "numLectures": {
                                "type": "number"
                            },
                            "duration": {
                                "type": "number"
                            },
                            "units": {
                                "type": "array",
                                "additionalItems": true,
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "lecture": {
                                            "type": "string",
                                            "pattern": "^[a-fA-F0-9]{24}$"
                                        },
                                        "quiz": {
                                            "type": "string",
                                            "pattern": "^[a-fA-F0-9]{24}$"
                                        },
                                        "type": {
                                            "type": "string"
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "description": {
                    "type": "string"
                },
                "suitableLearner": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": false
        },
        "meta": {
            "type": "object",
            "properties": {
                "studentCount": {
                    "type": "number"
                },
                "avgRatingScore": {
                    "type": "number"
                },
                "ratingCount": {
                    "type": "number"
                },
                "contentVideoLength": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "messages": {
            "type": "object",
            "properties": {
                "welcome": {
                    "type": "string"
                },
                "congratulation": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "promotions": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean"
                },
                "discountPrice": {
                    "type": "number"
                },
                "startAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "endAt": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false
        },
        "history": {
            "type": "object",
            "properties": {
                "publishedAt": {
                    "type": "string"
                },
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "status",
        "history"
    ]
}
2.1.2.4.5 courses JSON data
{
    "_id": ObjectId("5bfe515a1fdb0f57bbbb54f0"),
    "status": "Lorem",
    "categories": [
        ObjectId("bfc3acabfc2bdd4a31bfdb69")
    ],
    "basicInfo": {
        "title": "Lorem",
        "slug": "Lorem",
        "subtitle": "Lorem",
        "price": 41,
        "lan": "Lorem",
        "level": "Lorem",
        "currency": "Lorem",
        "isFree": false,
        "discount": -23,
        "image": "Lorem"
    },
    "details": {
        "requirements": [
            "Lorem"
        ],
        "objectives": [
            "Lorem"
        ],
        "sections": [
            {
                "title": "Lorem",
                "objective": "Lorem",
                "numLectures": -96,
                "duration": -22,
                "units": [
                    {
                        "lecture": ObjectId("9bedac0edd8bd5594670afad"),
                        "quiz": ObjectId("ddd8a6e5795387bbd4fefd5f"),
                        "type": "Lorem"
                    }
                ]
            }
        ],
        "description": "Lorem",
        "suitableLearner": [
            "Lorem"
        ]
    },
    "meta": {
        "studentCount": -21,
        "avgRatingScore": 56,
        "ratingCount": -46,
        "contentVideoLength": -56
    },
    "messages": {
        "welcome": "Lorem",
        "congratulation": "Lorem"
    },
    "promotions": {
        "enabled": true,
        "discountPrice": 35,
        "startAt": ISODate("2016-04-08T15:06:21.595Z"),
        "endAt": ISODate("2016-04-08T15:06:21.595Z")
    },
    "history": {
        "publishedAt": "Lorem",
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("dedc2edc8d3b552acd12ee74"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("5ebd5c39589bbe7f28fc33cc")
    }
}
2.1.2.4.6 courses Target Script
use online_course;

db.createCollection("courses", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "courses",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "status": {
                    "bsonType": "string"
                },
                "categories": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "objectId"
                    }
                },
                "basicInfo": {
                    "bsonType": "object",
                    "properties": {
                        "title": {
                            "bsonType": "string"
                        },
                        "slug": {
                            "bsonType": "string"
                        },
                        "subtitle": {
                            "bsonType": "string"
                        },
                        "price": {
                            "bsonType": "number"
                        },
                        "lan": {
                            "bsonType": "string"
                        },
                        "level": {
                            "bsonType": "string"
                        },
                        "currency": {
                            "bsonType": "string"
                        },
                        "isFree": {
                            "bsonType": "bool"
                        },
                        "discount": {
                            "bsonType": "number"
                        },
                        "image": {
                            "bsonType": "string"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "title"
                    ]
                },
                "details": {
                    "bsonType": "object",
                    "properties": {
                        "requirements": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "string"
                            }
                        },
                        "objectives": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "string"
                            }
                        },
                        "sections": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "object",
                                "properties": {
                                    "title": {
                                        "bsonType": "string"
                                    },
                                    "objective": {
                                        "bsonType": "string"
                                    },
                                    "numLectures": {
                                        "bsonType": "number"
                                    },
                                    "duration": {
                                        "bsonType": "number"
                                    },
                                    "units": {
                                        "bsonType": "array",
                                        "additionalItems": true,
                                        "items": {
                                            "bsonType": "object",
                                            "properties": {
                                                "lecture": {
                                                    "bsonType": "objectId"
                                                },
                                                "quiz": {
                                                    "bsonType": "objectId"
                                                },
                                                "type": {
                                                    "bsonType": "string"
                                                }
                                            },
                                            "additionalProperties": false
                                        }
                                    }
                                },
                                "additionalProperties": false
                            }
                        },
                        "description": {
                            "bsonType": "string"
                        },
                        "suitableLearner": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "string"
                            }
                        }
                    },
                    "additionalProperties": false
                },
                "meta": {
                    "bsonType": "object",
                    "properties": {
                        "studentCount": {
                            "bsonType": "number"
                        },
                        "avgRatingScore": {
                            "bsonType": "number"
                        },
                        "ratingCount": {
                            "bsonType": "number"
                        },
                        "contentVideoLength": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "messages": {
                    "bsonType": "object",
                    "properties": {
                        "welcome": {
                            "bsonType": "string"
                        },
                        "congratulation": {
                            "bsonType": "string"
                        }
                    },
                    "additionalProperties": false
                },
                "promotions": {
                    "bsonType": "object",
                    "properties": {
                        "enabled": {
                            "bsonType": "bool"
                        },
                        "discountPrice": {
                            "bsonType": "number"
                        },
                        "startAt": {
                            "bsonType": "date"
                        },
                        "endAt": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "publishedAt": {
                            "bsonType": "string"
                        },
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "status",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.5 Collection document_permissions
2.1.2.5.1 document_permissions Tree Diagram
2.1.2.5.2 document_permissions Properties
PropertyValue
Collection namedocument_permissions
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.5.3 document_permissions Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
namestringtrue
typestringtrue
permissionsarraytrue
[0]stringfalse
orderingnumerictrue
2.1.2.5.3.1 Field _id
2.1.2.5.3.1.1 _id Tree Diagram
2.1.2.5.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.5.3.2 Field name
2.1.2.5.3.2.1 name Tree Diagram
2.1.2.5.3.2.2 name properties
PropertyValue
Name name
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.5.3.3 Field type
2.1.2.5.3.3.1 type Tree Diagram
2.1.2.5.3.3.2 type properties
PropertyValue
Name type
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.5.3.4 Field permissions
2.1.2.5.3.4.1 permissions Tree Diagram
2.1.2.5.3.4.2 permissions Hierarchy
Parent field: document_permissions
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.5.3.4.3 permissions properties
PropertyValue
Name permissions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.5.3.5 Field [0]
2.1.2.5.3.5.1 [0] Tree Diagram
2.1.2.5.3.5.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.5.3.6 Field ordering
2.1.2.5.3.6.1 ordering Tree Diagram
2.1.2.5.3.6.2 ordering properties
PropertyValue
Name ordering
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.5.4 document_permissions JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "document_permissions",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "name": {
            "type": "string"
        },
        "type": {
            "type": "string"
        },
        "permissions": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "string"
            }
        },
        "ordering": {
            "type": "number"
        }
    },
    "additionalProperties": false,
    "required": [
        "name",
        "type",
        "permissions",
        "ordering"
    ]
}
2.1.2.5.5 document_permissions JSON data
{
    "_id": ObjectId("eabe5e6dba6ba41bb38cd8d9"),
    "name": "Lorem",
    "type": "Lorem",
    "permissions": [
        "Lorem"
    ],
    "ordering": -37
}
2.1.2.5.6 document_permissions Target Script
use online_course;

db.createCollection("document_permissions", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "document_permissions",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "name": {
                    "bsonType": "string"
                },
                "type": {
                    "bsonType": "string"
                },
                "permissions": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "string"
                    }
                },
                "ordering": {
                    "bsonType": "number"
                }
            },
            "additionalProperties": false,
            "required": [
                "name",
                "type",
                "permissions",
                "ordering"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.6 Collection files
2.1.2.6.1 files Tree Diagram
2.1.2.6.2 files Properties
PropertyValue
Collection namefiles
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.6.3 files Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
urlstringtrue
namestringtrue
statusstringtrue
sizenumericfalse
typestringfalse
thumbnailUrlstringfalse
durationnumericfalse
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.6.3.1 Field _id
2.1.2.6.3.1.1 _id Tree Diagram
2.1.2.6.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.6.3.2 Field url
2.1.2.6.3.2.1 url Tree Diagram
2.1.2.6.3.2.2 url properties
PropertyValue
Name url
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.6.3.3 Field name
2.1.2.6.3.3.1 name Tree Diagram
2.1.2.6.3.3.2 name properties
PropertyValue
Name name
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.6.3.4 Field status
2.1.2.6.3.4.1 status Tree Diagram
2.1.2.6.3.4.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.6.3.5 Field size
2.1.2.6.3.5.1 size Tree Diagram
2.1.2.6.3.5.2 size properties
PropertyValue
Name size
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.6.3.6 Field type
2.1.2.6.3.6.1 type Tree Diagram
2.1.2.6.3.6.2 type properties
PropertyValue
Name type
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.6.3.7 Field thumbnailUrl
2.1.2.6.3.7.1 thumbnailUrl Tree Diagram
2.1.2.6.3.7.2 thumbnailUrl properties
PropertyValue
Name thumbnailUrl
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.6.3.8 Field duration
2.1.2.6.3.8.1 duration Tree Diagram
2.1.2.6.3.8.2 duration properties
PropertyValue
Name duration
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.6.3.9 Field history
2.1.2.6.3.9.1 history Tree Diagram
2.1.2.6.3.9.2 history Hierarchy
Parent field: files
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.6.3.9.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.6.3.10 Field createdAt
2.1.2.6.3.10.1 createdAt Tree Diagram
2.1.2.6.3.10.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.6.3.11 Field createdBy
2.1.2.6.3.11.1 createdBy Tree Diagram
2.1.2.6.3.11.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.6.3.12 Field updatedAt
2.1.2.6.3.12.1 updatedAt Tree Diagram
2.1.2.6.3.12.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.6.3.13 Field updatedBy
2.1.2.6.3.13.1 updatedBy Tree Diagram
2.1.2.6.3.13.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.6.4 files JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "files",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "url": {
            "type": "string"
        },
        "name": {
            "type": "string"
        },
        "status": {
            "type": "string"
        },
        "size": {
            "type": "number"
        },
        "type": {
            "type": "string"
        },
        "thumbnailUrl": {
            "type": "string"
        },
        "duration": {
            "type": "number"
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "url",
        "name",
        "status",
        "history"
    ]
}
2.1.2.6.5 files JSON data
{
    "_id": ObjectId("43dfe60110f3c35dfa4a94bf"),
    "url": "Lorem",
    "name": "Lorem",
    "status": "Lorem",
    "size": 1,
    "type": "Lorem",
    "thumbnailUrl": "Lorem",
    "duration": -24,
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("7ca461e57b6407fa6ec89ce5"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("be0c8a82eff8bb40ab27cfe6")
    }
}
2.1.2.6.6 files Target Script
use online_course;

db.createCollection("files", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "files",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "url": {
                    "bsonType": "string"
                },
                "name": {
                    "bsonType": "string"
                },
                "status": {
                    "bsonType": "string"
                },
                "size": {
                    "bsonType": "number"
                },
                "type": {
                    "bsonType": "string"
                },
                "thumbnailUrl": {
                    "bsonType": "string"
                },
                "duration": {
                    "bsonType": "number"
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "url",
                "name",
                "status",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.7 Collection lectures
2.1.2.7.1 lectures Tree Diagram
2.1.2.7.2 lectures Properties
PropertyValue
Collection namelectures
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.7.3 lectures Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
titlestringtrue
descriptionstringfalse
videoobjectIdfalsefk
thumbnailobjectIdfalsefk
resourcesarrayfalse
[0]objectIdfalsefk
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.7.3.1 Field _id
2.1.2.7.3.1.1 _id Tree Diagram
2.1.2.7.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.7.3.2 Field title
2.1.2.7.3.2.1 title Tree Diagram
2.1.2.7.3.2.2 title properties
PropertyValue
Name title
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.7.3.3 Field description
2.1.2.7.3.3.1 description Tree Diagram
2.1.2.7.3.3.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.7.3.4 Field video
2.1.2.7.3.4.1 video Tree Diagram
2.1.2.7.3.4.2 video properties
PropertyValue
Name video
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection files
Foreign field _id
Relationship type Foreign Key
Relationship name fk files. to lectures.
Cardinality 1
Default
Sample
Comments
2.1.2.7.3.5 Field thumbnail
2.1.2.7.3.5.1 thumbnail Tree Diagram
2.1.2.7.3.5.2 thumbnail properties
PropertyValue
Name thumbnail
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection files
Foreign field _id
Relationship type Foreign Key
Relationship name fk files. to lectures.
Cardinality 1
Default
Sample
Comments
2.1.2.7.3.6 Field resources
2.1.2.7.3.6.1 resources Tree Diagram
2.1.2.7.3.6.2 resources Hierarchy
Parent field: lectures
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalse
2.1.2.7.3.6.3 resources properties
PropertyValue
Name resources
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.7.3.7 Field [0]
2.1.2.7.3.7.1 [0] Tree Diagram
2.1.2.7.3.7.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Primary key
Foreign collection files
Foreign field _id
Relationship type Foreign Key
Relationship name fk files. to lectures.
Cardinality 1
Default
Sample
Comments
2.1.2.7.3.8 Field history
2.1.2.7.3.8.1 history Tree Diagram
2.1.2.7.3.8.2 history Hierarchy
Parent field: lectures
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.7.3.8.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.7.3.9 Field createdAt
2.1.2.7.3.9.1 createdAt Tree Diagram
2.1.2.7.3.9.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.7.3.10 Field createdBy
2.1.2.7.3.10.1 createdBy Tree Diagram
2.1.2.7.3.10.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.7.3.11 Field updatedAt
2.1.2.7.3.11.1 updatedAt Tree Diagram
2.1.2.7.3.11.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.7.3.12 Field updatedBy
2.1.2.7.3.12.1 updatedBy Tree Diagram
2.1.2.7.3.12.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.7.4 lectures JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "lectures",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "title": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "video": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "thumbnail": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "resources": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{24}$"
            }
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "title",
        "history"
    ]
}
2.1.2.7.5 lectures JSON data
{
    "_id": ObjectId("e1cd62e9d9a7ead0197fdf8c"),
    "title": "Lorem",
    "description": "Lorem",
    "video": ObjectId("f3ebf2a749ec973a65b97fca"),
    "thumbnail": ObjectId("d1fe3f7ef3569ab9db2a57ac"),
    "resources": [
        ObjectId("66799e7a98a17feee9ddaea9")
    ],
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("20ce437c724e28e4cefcf4d7"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("1bbca7f9089ac32f6228addd")
    }
}
2.1.2.7.6 lectures Target Script
use online_course;

db.createCollection("lectures", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "lectures",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "title": {
                    "bsonType": "string"
                },
                "description": {
                    "bsonType": "string"
                },
                "video": {
                    "bsonType": "objectId"
                },
                "thumbnail": {
                    "bsonType": "objectId"
                },
                "resources": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "objectId"
                    }
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "title",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.8 Collection notifications
2.1.2.8.1 notifications Tree Diagram
2.1.2.8.2 notifications Properties
PropertyValue
Collection namenotifications
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.8.3 notifications Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
sourceIdobjectIdfalse
contextIdobjectIdfalse
sourceSlugstringfalse
sourceTypestringfalse
collectionNamestringfalse
receiverobjectIdtruefk
contentstringtrue
thumbstringfalse
isReadbooleanfalse
isNewbooleanfalse
createdAtdatetrue
2.1.2.8.3.1 Field _id
2.1.2.8.3.1.1 _id Tree Diagram
2.1.2.8.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.8.3.2 Field sourceId
2.1.2.8.3.2.1 sourceId Tree Diagram
2.1.2.8.3.2.2 sourceId properties
PropertyValue
Name sourceId
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.8.3.3 Field contextId
2.1.2.8.3.3.1 contextId Tree Diagram
2.1.2.8.3.3.2 contextId properties
PropertyValue
Name contextId
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.8.3.4 Field sourceSlug
2.1.2.8.3.4.1 sourceSlug Tree Diagram
2.1.2.8.3.4.2 sourceSlug properties
PropertyValue
Name sourceSlug
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.8.3.5 Field sourceType
2.1.2.8.3.5.1 sourceType Tree Diagram
2.1.2.8.3.5.2 sourceType properties
PropertyValue
Name sourceType
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.8.3.6 Field collectionName
2.1.2.8.3.6.1 collectionName Tree Diagram
2.1.2.8.3.6.2 collectionName properties
PropertyValue
Name collectionName
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.8.3.7 Field receiver
2.1.2.8.3.7.1 receiver Tree Diagram
2.1.2.8.3.7.2 receiver properties
PropertyValue
Name receiver
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to notifications.
Cardinality 1
Default
Sample
Comments
2.1.2.8.3.8 Field content
2.1.2.8.3.8.1 content Tree Diagram
2.1.2.8.3.8.2 content properties
PropertyValue
Name content
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.8.3.9 Field thumb
2.1.2.8.3.9.1 thumb Tree Diagram
2.1.2.8.3.9.2 thumb properties
PropertyValue
Name thumb
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.8.3.10 Field isRead
2.1.2.8.3.10.1 isRead Tree Diagram
2.1.2.8.3.10.2 isRead properties
PropertyValue
Name isRead
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default false
Sample
Comments
2.1.2.8.3.11 Field isNew
2.1.2.8.3.11.1 isNew Tree Diagram
2.1.2.8.3.11.2 isNew properties
PropertyValue
Name isNew
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default false
Sample
Comments
2.1.2.8.3.12 Field createdAt
2.1.2.8.3.12.1 createdAt Tree Diagram
2.1.2.8.3.12.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.8.4 notifications JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "notifications",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "sourceId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "contextId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "sourceSlug": {
            "type": "string"
        },
        "sourceType": {
            "type": "string"
        },
        "collectionName": {
            "type": "string"
        },
        "receiver": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "content": {
            "type": "string"
        },
        "thumb": {
            "type": "string"
        },
        "isRead": {
            "type": "boolean",
            "default": false
        },
        "isNew": {
            "type": "boolean",
            "default": false
        },
        "createdAt": {
            "type": "string",
            "format": "date-time"
        }
    },
    "additionalProperties": false,
    "required": [
        "receiver",
        "content",
        "createdAt"
    ]
}
2.1.2.8.5 notifications JSON data
{
    "_id": ObjectId("aedffdbfdf6afd9288720db1"),
    "sourceId": ObjectId("ade0029ae7ccd2cd1ffbbe32"),
    "contextId": ObjectId("31e4e7ea0b324aedb6efca30"),
    "sourceSlug": "Lorem",
    "sourceType": "Lorem",
    "collectionName": "Lorem",
    "receiver": ObjectId("fdffa4a8167d0047b1c55eae"),
    "content": "Lorem",
    "thumb": "Lorem",
    "isRead": false,
    "isNew": false,
    "createdAt": ISODate("2016-04-08T15:06:21.595Z")
}
2.1.2.8.6 notifications Target Script
use online_course;

db.createCollection("notifications", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "notifications",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "sourceId": {
                    "bsonType": "objectId"
                },
                "contextId": {
                    "bsonType": "objectId"
                },
                "sourceSlug": {
                    "bsonType": "string"
                },
                "sourceType": {
                    "bsonType": "string"
                },
                "collectionName": {
                    "bsonType": "string"
                },
                "receiver": {
                    "bsonType": "objectId"
                },
                "content": {
                    "bsonType": "string"
                },
                "thumb": {
                    "bsonType": "string"
                },
                "isRead": {
                    "bsonType": "bool"
                },
                "isNew": {
                    "bsonType": "bool"
                },
                "createdAt": {
                    "bsonType": "date"
                }
            },
            "additionalProperties": false,
            "required": [
                "receiver",
                "content",
                "createdAt"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.9 Collection orders
2.1.2.9.1 orders Tree Diagram
2.1.2.9.2 orders Properties
PropertyValue
Collection nameorders
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.9.3 orders Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
totalPricenumericfalse
coursesInOrderdocumentfalse
courseobjectIdfalsefk
salePricenumericfalse
pricenumericfalse
moneyConfigurationdocumentfalse
instructorCommissionnumericfalse
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.9.3.1 Field _id
2.1.2.9.3.1.1 _id Tree Diagram
2.1.2.9.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.9.3.2 Field totalPrice
2.1.2.9.3.2.1 totalPrice Tree Diagram
2.1.2.9.3.2.2 totalPrice properties
PropertyValue
Name totalPrice
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.9.3.3 Field coursesInOrder
2.1.2.9.3.3.1 coursesInOrder Tree Diagram
2.1.2.9.3.3.2 coursesInOrder Hierarchy
Parent field: orders
Child field(s):
FieldTypeReqKeyDescriptionComments
courseobjectIdfalse
salePricenumericfalse
pricenumericfalse
2.1.2.9.3.3.3 coursesInOrder properties
PropertyValue
Name coursesInOrder
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.9.3.4 Field course
2.1.2.9.3.4.1 course Tree Diagram
2.1.2.9.3.4.2 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to orders.
Cardinality 1
Default
Sample
Comments
2.1.2.9.3.5 Field salePrice
2.1.2.9.3.5.1 salePrice Tree Diagram
2.1.2.9.3.5.2 salePrice properties
PropertyValue
Name salePrice
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.9.3.6 Field price
2.1.2.9.3.6.1 price Tree Diagram
2.1.2.9.3.6.2 price properties
PropertyValue
Name price
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.9.3.7 Field moneyConfiguration
2.1.2.9.3.7.1 moneyConfiguration Tree Diagram
2.1.2.9.3.7.2 moneyConfiguration Hierarchy
Parent field: orders
Child field(s):
FieldTypeReqKeyDescriptionComments
instructorCommissionnumericfalse
2.1.2.9.3.7.3 moneyConfiguration properties
PropertyValue
Name moneyConfiguration
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.9.3.8 Field instructorCommission
2.1.2.9.3.8.1 instructorCommission Tree Diagram
2.1.2.9.3.8.2 instructorCommission properties
PropertyValue
Name instructorCommission
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.9.3.9 Field history
2.1.2.9.3.9.1 history Tree Diagram
2.1.2.9.3.9.2 history Hierarchy
Parent field: orders
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.9.3.9.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.9.3.10 Field createdAt
2.1.2.9.3.10.1 createdAt Tree Diagram
2.1.2.9.3.10.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.9.3.11 Field createdBy
2.1.2.9.3.11.1 createdBy Tree Diagram
2.1.2.9.3.11.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.9.3.12 Field updatedAt
2.1.2.9.3.12.1 updatedAt Tree Diagram
2.1.2.9.3.12.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.9.3.13 Field updatedBy
2.1.2.9.3.13.1 updatedBy Tree Diagram
2.1.2.9.3.13.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.9.4 orders JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "orders",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "totalPrice": {
            "type": "number"
        },
        "coursesInOrder": {
            "type": "object",
            "properties": {
                "course": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "salePrice": {
                    "type": "number"
                },
                "price": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "moneyConfiguration": {
            "type": "object",
            "properties": {
                "instructorCommission": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "history"
    ]
}
2.1.2.9.5 orders JSON data
{
    "_id": ObjectId("db4c6dd7fd0cfcca2cb3aebf"),
    "totalPrice": -23,
    "coursesInOrder": {
        "course": ObjectId("b531ffdf5ee0ea70adc04b30"),
        "salePrice": 88,
        "price": 1
    },
    "moneyConfiguration": {
        "instructorCommission": 26
    },
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("3bbf6c268a721b87ac65b635"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("ed84db8f9c4fefa2de26cda2")
    }
}
2.1.2.9.6 orders Target Script
use online_course;

db.createCollection("orders", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "orders",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "totalPrice": {
                    "bsonType": "number"
                },
                "coursesInOrder": {
                    "bsonType": "object",
                    "properties": {
                        "course": {
                            "bsonType": "objectId"
                        },
                        "salePrice": {
                            "bsonType": "number"
                        },
                        "price": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "moneyConfiguration": {
                    "bsonType": "object",
                    "properties": {
                        "instructorCommission": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.10 Collection payments
2.1.2.10.1 payments Tree Diagram
2.1.2.10.2 payments Properties
PropertyValue
Collection namepayments
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.10.3 payments Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
statusstringtrue
userstringtruefk
amountnumericfalse
commissionAmountnumericfalse
earningsnumericfalse
historydocumenttrue
paidAtdatefalse
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.10.3.1 Field _id
2.1.2.10.3.1.1 _id Tree Diagram
2.1.2.10.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.10.3.2 Field status
2.1.2.10.3.2.1 status Tree Diagram
2.1.2.10.3.2.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.10.3.3 Field user
2.1.2.10.3.3.1 user Tree Diagram
2.1.2.10.3.3.2 user properties
PropertyValue
Name user
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to payments.
Cardinality 1
Faker function
Sample
Comments
2.1.2.10.3.4 Field amount
2.1.2.10.3.4.1 amount Tree Diagram
2.1.2.10.3.4.2 amount properties
PropertyValue
Name amount
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.10.3.5 Field commissionAmount
2.1.2.10.3.5.1 commissionAmount Tree Diagram
2.1.2.10.3.5.2 commissionAmount properties
PropertyValue
Name commissionAmount
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.10.3.6 Field earnings
2.1.2.10.3.6.1 earnings Tree Diagram
2.1.2.10.3.6.2 earnings properties
PropertyValue
Name earnings
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.10.3.7 Field history
2.1.2.10.3.7.1 history Tree Diagram
2.1.2.10.3.7.2 history Hierarchy
Parent field: payments
Child field(s):
FieldTypeReqKeyDescriptionComments
paidAtdatefalse
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.10.3.7.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.10.3.8 Field paidAt
2.1.2.10.3.8.1 paidAt Tree Diagram
2.1.2.10.3.8.2 paidAt properties
PropertyValue
Name paidAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.10.3.9 Field createdAt
2.1.2.10.3.9.1 createdAt Tree Diagram
2.1.2.10.3.9.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.10.3.10 Field createdBy
2.1.2.10.3.10.1 createdBy Tree Diagram
2.1.2.10.3.10.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.10.3.11 Field updatedAt
2.1.2.10.3.11.1 updatedAt Tree Diagram
2.1.2.10.3.11.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.10.3.12 Field updatedBy
2.1.2.10.3.12.1 updatedBy Tree Diagram
2.1.2.10.3.12.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.10.4 payments JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "payments",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "status": {
            "type": "string"
        },
        "user": {
            "type": "string"
        },
        "amount": {
            "type": "number"
        },
        "commissionAmount": {
            "type": "number"
        },
        "earnings": {
            "type": "number"
        },
        "history": {
            "type": "object",
            "properties": {
                "paidAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "status",
        "user",
        "history"
    ]
}
2.1.2.10.5 payments JSON data
{
    "_id": ObjectId("f45c4fd65eead6fee4fbf48d"),
    "status": "Lorem",
    "user": "Lorem",
    "amount": -4,
    "commissionAmount": 58,
    "earnings": -80,
    "history": {
        "paidAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("01b5f1c8e35ee5c4cafeaeba"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("badf7a16c26bebe02dd0bada")
    }
}
2.1.2.10.6 payments Target Script
use online_course;

db.createCollection("payments", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "payments",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "status": {
                    "bsonType": "string"
                },
                "user": {
                    "bsonType": "string"
                },
                "amount": {
                    "bsonType": "number"
                },
                "commissionAmount": {
                    "bsonType": "number"
                },
                "earnings": {
                    "bsonType": "number"
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "paidAt": {
                            "bsonType": "date"
                        },
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "status",
                "user",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.11 Collection quizzes
2.1.2.11.1 quizzes Tree Diagram
2.1.2.11.2 quizzes Properties
PropertyValue
Collection namequizzes
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.11.3 quizzes Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
titlestringtrue
descriptionstringfalse
questionsarrayfalse
[0]documentfalse
questionContentstringtrue
answerOptionsarrayfalse
[0]documentfalse
answerContentstringtrue
optionNostringtrue
descriptionstringfalse
correctOptionNonumerictrue
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.11.3.1 Field _id
2.1.2.11.3.1.1 _id Tree Diagram
2.1.2.11.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.11.3.2 Field title
2.1.2.11.3.2.1 title Tree Diagram
2.1.2.11.3.2.2 title properties
PropertyValue
Name title
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.3 Field description
2.1.2.11.3.3.1 description Tree Diagram
2.1.2.11.3.3.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.4 Field questions
2.1.2.11.3.4.1 questions Tree Diagram
2.1.2.11.3.4.2 questions Hierarchy
Parent field: quizzes
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.11.3.4.3 questions properties
PropertyValue
Name questions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.11.3.5 Field [0]
2.1.2.11.3.5.1 [0] Tree Diagram
2.1.2.11.3.5.2 [0] Hierarchy
Parent field: questions
Child field(s):
FieldTypeReqKeyDescriptionComments
questionContentstringtrue
answerOptionsarrayfalse
correctOptionNonumerictrue
2.1.2.11.3.5.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.11.3.6 Field questionContent
2.1.2.11.3.6.1 questionContent Tree Diagram
2.1.2.11.3.6.2 questionContent properties
PropertyValue
Name questionContent
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.7 Field answerOptions
2.1.2.11.3.7.1 answerOptions Tree Diagram
2.1.2.11.3.7.2 answerOptions Hierarchy
Parent field: [0]
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.11.3.7.3 answerOptions properties
PropertyValue
Name answerOptions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.11.3.8 Field [0]
2.1.2.11.3.8.1 [0] Tree Diagram
2.1.2.11.3.8.2 [0] Hierarchy
Parent field: answerOptions
Child field(s):
FieldTypeReqKeyDescriptionComments
answerContentstringtrue
optionNostringtrue
descriptionstringfalse
2.1.2.11.3.8.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.11.3.9 Field answerContent
2.1.2.11.3.9.1 answerContent Tree Diagram
2.1.2.11.3.9.2 answerContent properties
PropertyValue
Name answerContent
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.10 Field optionNo
2.1.2.11.3.10.1 optionNo Tree Diagram
2.1.2.11.3.10.2 optionNo properties
PropertyValue
Name optionNo
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.11 Field description
2.1.2.11.3.11.1 description Tree Diagram
2.1.2.11.3.11.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.11.3.12 Field correctOptionNo
2.1.2.11.3.12.1 correctOptionNo Tree Diagram
2.1.2.11.3.12.2 correctOptionNo properties
PropertyValue
Name correctOptionNo
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.11.3.13 Field history
2.1.2.11.3.13.1 history Tree Diagram
2.1.2.11.3.13.2 history Hierarchy
Parent field: quizzes
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.11.3.13.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.11.3.14 Field createdAt
2.1.2.11.3.14.1 createdAt Tree Diagram
2.1.2.11.3.14.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.11.3.15 Field createdBy
2.1.2.11.3.15.1 createdBy Tree Diagram
2.1.2.11.3.15.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.11.3.16 Field updatedAt
2.1.2.11.3.16.1 updatedAt Tree Diagram
2.1.2.11.3.16.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.11.3.17 Field updatedBy
2.1.2.11.3.17.1 updatedBy Tree Diagram
2.1.2.11.3.17.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.11.4 quizzes JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "quizzes",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "title": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "questions": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "questionContent": {
                        "type": "string"
                    },
                    "answerOptions": {
                        "type": "array",
                        "additionalItems": true,
                        "items": {
                            "type": "object",
                            "properties": {
                                "answerContent": {
                                    "type": "string"
                                },
                                "optionNo": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "answerContent",
                                "optionNo"
                            ]
                        }
                    },
                    "correctOptionNo": {
                        "type": "number"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "questionContent",
                    "correctOptionNo"
                ]
            }
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "title",
        "history"
    ]
}
2.1.2.11.5 quizzes JSON data
{
    "_id": ObjectId("cbdd92d75a0af6479dc4abed"),
    "title": "Lorem",
    "description": "Lorem",
    "questions": [
        {
            "questionContent": "Lorem",
            "answerOptions": [
                {
                    "answerContent": "Lorem",
                    "optionNo": "Lorem",
                    "description": "Lorem"
                }
            ],
            "correctOptionNo": -57
        }
    ],
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("1fe4b34fdfe25b0b8d8fe739"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("5bd19ace5330bebf92f54be3")
    }
}
2.1.2.11.6 quizzes Target Script
use online_course;

db.createCollection("quizzes", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "quizzes",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "title": {
                    "bsonType": "string"
                },
                "description": {
                    "bsonType": "string"
                },
                "questions": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "object",
                        "properties": {
                            "questionContent": {
                                "bsonType": "string"
                            },
                            "answerOptions": {
                                "bsonType": "array",
                                "additionalItems": true,
                                "items": {
                                    "bsonType": "object",
                                    "properties": {
                                        "answerContent": {
                                            "bsonType": "string"
                                        },
                                        "optionNo": {
                                            "bsonType": "string"
                                        },
                                        "description": {
                                            "bsonType": "string"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "answerContent",
                                        "optionNo"
                                    ]
                                }
                            },
                            "correctOptionNo": {
                                "bsonType": "number"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "questionContent",
                            "correctOptionNo"
                        ]
                    }
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "title",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.12 Collection reviews
2.1.2.12.1 reviews Tree Diagram
2.1.2.12.2 reviews Properties
PropertyValue
Collection namereviews
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.12.3 reviews Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
ratingnumerictrue
contentstringfalse
userobjectIdtruefk
courseobjectIdtruefk
responsedocumentfalse
userobjectIdtruefk
contentstringtrue
timestampsdatetrue
timestampsdocumenttrue
createdAtdatetrue
updatedAtdatefalse
2.1.2.12.3.1 Field _id
2.1.2.12.3.1.1 _id Tree Diagram
2.1.2.12.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.12.3.2 Field rating
2.1.2.12.3.2.1 rating Tree Diagram
2.1.2.12.3.2.2 rating properties
PropertyValue
Name rating
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.12.3.3 Field content
2.1.2.12.3.3.1 content Tree Diagram
2.1.2.12.3.3.2 content properties
PropertyValue
Name content
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.12.3.4 Field user
2.1.2.12.3.4.1 user Tree Diagram
2.1.2.12.3.4.2 user properties
PropertyValue
Name user
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.12.3.5 Field course
2.1.2.12.3.5.1 course Tree Diagram
2.1.2.12.3.5.2 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.12.3.6 Field response
2.1.2.12.3.6.1 response Tree Diagram
2.1.2.12.3.6.2 response Hierarchy
Parent field: reviews
Child field(s):
FieldTypeReqKeyDescriptionComments
userobjectIdtrue
contentstringtrue
timestampsdatetrue
2.1.2.12.3.6.3 response properties
PropertyValue
Name response
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.12.3.7 Field user
2.1.2.12.3.7.1 user Tree Diagram
2.1.2.12.3.7.2 user properties
PropertyValue
Name user
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.12.3.8 Field content
2.1.2.12.3.8.1 content Tree Diagram
2.1.2.12.3.8.2 content properties
PropertyValue
Name content
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.12.3.9 Field timestamps
2.1.2.12.3.9.1 timestamps Tree Diagram
2.1.2.12.3.9.2 timestamps properties
PropertyValue
Name timestamps
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.12.3.10 Field timestamps
2.1.2.12.3.10.1 timestamps Tree Diagram
2.1.2.12.3.10.2 timestamps Hierarchy
Parent field: reviews
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
updatedAtdatefalse
2.1.2.12.3.10.3 timestamps properties
PropertyValue
Name timestamps
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.12.3.11 Field createdAt
2.1.2.12.3.11.1 createdAt Tree Diagram
2.1.2.12.3.11.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.12.3.12 Field updatedAt
2.1.2.12.3.12.1 updatedAt Tree Diagram
2.1.2.12.3.12.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.12.4 reviews JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "reviews",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "rating": {
            "type": "number"
        },
        "content": {
            "type": "string"
        },
        "user": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "course": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "response": {
            "type": "object",
            "properties": {
                "user": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "content": {
                    "type": "string"
                },
                "timestamps": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false,
            "required": [
                "user",
                "content",
                "timestamps"
            ]
        },
        "timestamps": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "rating",
        "user",
        "course",
        "timestamps"
    ]
}
2.1.2.12.5 reviews JSON data
{
    "_id": ObjectId("afbae0d2f88b7c8f471aa619"),
    "rating": 47,
    "content": "Lorem",
    "user": ObjectId("111ac4b78265d245dc5c5b2c"),
    "course": ObjectId("ce0b5c2c826cebe0bfa34acd"),
    "response": {
        "user": ObjectId("6cef2755fae8eeebfc8af60c"),
        "content": "Lorem",
        "timestamps": ISODate("2016-04-08T15:06:21.595Z")
    },
    "timestamps": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z")
    }
}
2.1.2.12.6 reviews Target Script
use online_course;

db.createCollection("reviews", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "reviews",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "rating": {
                    "bsonType": "number"
                },
                "content": {
                    "bsonType": "string"
                },
                "user": {
                    "bsonType": "objectId"
                },
                "course": {
                    "bsonType": "objectId"
                },
                "response": {
                    "bsonType": "object",
                    "properties": {
                        "user": {
                            "bsonType": "objectId"
                        },
                        "content": {
                            "bsonType": "string"
                        },
                        "timestamps": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "user",
                        "content",
                        "timestamps"
                    ]
                },
                "timestamps": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "rating",
                "user",
                "course",
                "timestamps"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.13 Collection roles
2.1.2.13.1 roles Tree Diagram
2.1.2.13.2 roles Properties
PropertyValue
Collection nameroles
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.13.3 roles Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
namestringtrue
statusstringtrue
descriptionstringfalse
orderingnumerictrue
permissionsarrayfalse
[0]documentfalse
_idobjectIdfalse
documentPermissionobjectIdfalsefk
enabledPermissionsarrayfalse
[0]stringfalse
onlyForCreatorbooleanfalse
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.13.3.1 Field _id
2.1.2.13.3.1.1 _id Tree Diagram
2.1.2.13.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.13.3.2 Field name
2.1.2.13.3.2.1 name Tree Diagram
2.1.2.13.3.2.2 name properties
PropertyValue
Name name
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.13.3.3 Field status
2.1.2.13.3.3.1 status Tree Diagram
2.1.2.13.3.3.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.13.3.4 Field description
2.1.2.13.3.4.1 description Tree Diagram
2.1.2.13.3.4.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.13.3.5 Field ordering
2.1.2.13.3.5.1 ordering Tree Diagram
2.1.2.13.3.5.2 ordering properties
PropertyValue
Name ordering
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.13.3.6 Field permissions
2.1.2.13.3.6.1 permissions Tree Diagram
2.1.2.13.3.6.2 permissions Hierarchy
Parent field: roles
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.13.3.6.3 permissions properties
PropertyValue
Name permissions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.13.3.7 Field [0]
2.1.2.13.3.7.1 [0] Tree Diagram
2.1.2.13.3.7.2 [0] Hierarchy
Parent field: permissions
Child field(s):
FieldTypeReqKeyDescriptionComments
_idobjectIdfalse
documentPermissionobjectIdfalse
enabledPermissionsarrayfalse
onlyForCreatorbooleanfalse
2.1.2.13.3.7.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.13.3.8 Field _id
2.1.2.13.3.8.1 _id Tree Diagram
2.1.2.13.3.8.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.13.3.9 Field documentPermission
2.1.2.13.3.9.1 documentPermission Tree Diagram
2.1.2.13.3.9.2 documentPermission properties
PropertyValue
Name documentPermission
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection document_permissions
Foreign field _id
Relationship type Foreign Key
Relationship name fk document_permissions. to roles.
Cardinality 1
Default
Sample
Comments
2.1.2.13.3.10 Field enabledPermissions
2.1.2.13.3.10.1 enabledPermissions Tree Diagram
2.1.2.13.3.10.2 enabledPermissions Hierarchy
Parent field: [0]
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.13.3.10.3 enabledPermissions properties
PropertyValue
Name enabledPermissions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.13.3.11 Field [0]
2.1.2.13.3.11.1 [0] Tree Diagram
2.1.2.13.3.11.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.13.3.12 Field onlyForCreator
2.1.2.13.3.12.1 onlyForCreator Tree Diagram
2.1.2.13.3.12.2 onlyForCreator properties
PropertyValue
Name onlyForCreator
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default false
Sample
Comments
2.1.2.13.3.13 Field history
2.1.2.13.3.13.1 history Tree Diagram
2.1.2.13.3.13.2 history Hierarchy
Parent field: roles
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.13.3.13.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.13.3.14 Field createdAt
2.1.2.13.3.14.1 createdAt Tree Diagram
2.1.2.13.3.14.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.13.3.15 Field createdBy
2.1.2.13.3.15.1 createdBy Tree Diagram
2.1.2.13.3.15.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.13.3.16 Field updatedAt
2.1.2.13.3.16.1 updatedAt Tree Diagram
2.1.2.13.3.16.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.13.3.17 Field updatedBy
2.1.2.13.3.17.1 updatedBy Tree Diagram
2.1.2.13.3.17.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.13.4 roles JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "roles",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "name": {
            "type": "string"
        },
        "status": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "ordering": {
            "type": "number"
        },
        "permissions": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "object",
                "properties": {
                    "_id": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{24}$"
                    },
                    "documentPermission": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{24}$"
                    },
                    "enabledPermissions": {
                        "type": "array",
                        "additionalItems": true,
                        "items": {
                            "type": "string"
                        }
                    },
                    "onlyForCreator": {
                        "type": "boolean",
                        "default": false
                    }
                },
                "additionalProperties": false
            }
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "name",
        "status",
        "ordering",
        "history"
    ]
}
2.1.2.13.5 roles JSON data
{
    "_id": ObjectId("3a1a415ef02eacee1fbc3966"),
    "name": "Lorem",
    "status": "Lorem",
    "description": "Lorem",
    "ordering": -43,
    "permissions": [
        {
            "_id": ObjectId("52bfd50c0a2fe131f99bafe5"),
            "documentPermission": ObjectId("6b36dc39fe656cc7d9ce3afc"),
            "enabledPermissions": [
                "Lorem"
            ],
            "onlyForCreator": false
        }
    ],
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("fedea57a8815fd2cf13e7bcf"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("79d193d2e07ebbac3ea3cef0")
    }
}
2.1.2.13.6 roles Target Script
use online_course;

db.createCollection("roles", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "roles",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "name": {
                    "bsonType": "string"
                },
                "status": {
                    "bsonType": "string"
                },
                "description": {
                    "bsonType": "string"
                },
                "ordering": {
                    "bsonType": "number"
                },
                "permissions": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "object",
                        "properties": {
                            "_id": {
                                "bsonType": "objectId"
                            },
                            "documentPermission": {
                                "bsonType": "objectId"
                            },
                            "enabledPermissions": {
                                "bsonType": "array",
                                "additionalItems": true,
                                "items": {
                                    "bsonType": "string"
                                }
                            },
                            "onlyForCreator": {
                                "bsonType": "bool"
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "name",
                "status",
                "ordering",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.14 Collection sliders
2.1.2.14.1 sliders Tree Diagram
2.1.2.14.2 sliders Properties
PropertyValue
Collection namesliders
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.14.3 sliders Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
namestringtruedk
statusstringtrue
descriptionstringfalse
avatarstringfalsefk
historydocumenttrue
createdAtdatetrue
createdByobjectIdtruefk
updatedAtdatefalse
updatedByobjectIdfalsefk
2.1.2.14.3.1 Field _id
2.1.2.14.3.1.1 _id Tree Diagram
2.1.2.14.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.14.3.2 Field name
2.1.2.14.3.2.1 name Tree Diagram
2.1.2.14.3.2.2 name properties
PropertyValue
Name name
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.14.3.3 Field status
2.1.2.14.3.3.1 status Tree Diagram
2.1.2.14.3.3.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.14.3.4 Field description
2.1.2.14.3.4.1 description Tree Diagram
2.1.2.14.3.4.2 description properties
PropertyValue
Name description
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.14.3.5 Field avatar
2.1.2.14.3.5.1 avatar Tree Diagram
2.1.2.14.3.5.2 avatar properties
PropertyValue
Name avatar
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection sliders
Foreign field name
Relationship type Foreign Key
Relationship name fk sliders.name to sliders.avatar
Cardinality 1
Faker function
Sample
Comments
2.1.2.14.3.6 Field history
2.1.2.14.3.6.1 history Tree Diagram
2.1.2.14.3.6.2 history Hierarchy
Parent field: sliders
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
createdByobjectIdtrue
updatedAtdatefalse
updatedByobjectIdfalse
2.1.2.14.3.6.3 history properties
PropertyValue
Name history
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.14.3.7 Field createdAt
2.1.2.14.3.7.1 createdAt Tree Diagram
2.1.2.14.3.7.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.14.3.8 Field createdBy
2.1.2.14.3.8.1 createdBy Tree Diagram
2.1.2.14.3.8.2 createdBy properties
PropertyValue
Name createdBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.14.3.9 Field updatedAt
2.1.2.14.3.9.1 updatedAt Tree Diagram
2.1.2.14.3.9.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.14.3.10 Field updatedBy
2.1.2.14.3.10.1 updatedBy Tree Diagram
2.1.2.14.3.10.2 updatedBy properties
PropertyValue
Name updatedBy
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to courses.
Cardinality 1
Default
Sample
Comments
2.1.2.14.4 sliders JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "sliders",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "name": {
            "type": "string"
        },
        "status": {
            "type": "string"
        },
        "description": {
            "type": "string"
        },
        "avatar": {
            "type": "string"
        },
        "history": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "createdBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedBy": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt",
                "createdBy"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "name",
        "status",
        "history"
    ]
}
2.1.2.14.5 sliders JSON data
{
    "_id": ObjectId("2a8717f6b5abcfbae3e1a5ca"),
    "name": "Lorem",
    "status": "Lorem",
    "description": "Lorem",
    "avatar": "Lorem",
    "history": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "createdBy": ObjectId("da57bff14c86050b9aadba79"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedBy": ObjectId("b1fac9a9aef86bb1a1c0098f")
    }
}
2.1.2.14.6 sliders Target Script
use online_course;

db.createCollection("sliders", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "sliders",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "name": {
                    "bsonType": "string"
                },
                "status": {
                    "bsonType": "string"
                },
                "description": {
                    "bsonType": "string"
                },
                "avatar": {
                    "bsonType": "string"
                },
                "history": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "createdBy": {
                            "bsonType": "objectId"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        },
                        "updatedBy": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt",
                        "createdBy"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "name",
                "status",
                "history"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.15 Collection transactions
2.1.2.15.1 transactions Tree Diagram
2.1.2.15.2 transactions Properties
PropertyValue
Collection nametransactions
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.15.3 transactions Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
paymentobjectIdtruefk
customerobjectIdtruefk
instructorobjectIdtruefk
courseobjectIdtruefk
salePricenumerictrue
moneyConfigurationdocumenttrue
instructorCommissionnumericfalse
timestampsdocumenttrue
createdAtdatetrue
updatedAtdatefalse
2.1.2.15.3.1 Field _id
2.1.2.15.3.1.1 _id Tree Diagram
2.1.2.15.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.15.3.2 Field payment
2.1.2.15.3.2.1 payment Tree Diagram
2.1.2.15.3.2.2 payment properties
PropertyValue
Name payment
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection payments
Foreign field _id
Relationship type Foreign Key
Relationship name fk payments. to transactions.
Cardinality 1
Default
Sample
Comments
2.1.2.15.3.3 Field customer
2.1.2.15.3.3.1 customer Tree Diagram
2.1.2.15.3.3.2 customer properties
PropertyValue
Name customer
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to transactions.
Cardinality 1
Default
Sample
Comments
2.1.2.15.3.4 Field instructor
2.1.2.15.3.4.1 instructor Tree Diagram
2.1.2.15.3.4.2 instructor properties
PropertyValue
Name instructor
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to transactions.
Cardinality 1
Default
Sample
Comments
2.1.2.15.3.5 Field course
2.1.2.15.3.5.1 course Tree Diagram
2.1.2.15.3.5.2 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to transactions.
Cardinality 1
Default
Sample
Comments
2.1.2.15.3.6 Field salePrice
2.1.2.15.3.6.1 salePrice Tree Diagram
2.1.2.15.3.6.2 salePrice properties
PropertyValue
Name salePrice
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.15.3.7 Field moneyConfiguration
2.1.2.15.3.7.1 moneyConfiguration Tree Diagram
2.1.2.15.3.7.2 moneyConfiguration Hierarchy
Parent field: transactions
Child field(s):
FieldTypeReqKeyDescriptionComments
instructorCommissionnumericfalse
2.1.2.15.3.7.3 moneyConfiguration properties
PropertyValue
Name moneyConfiguration
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.15.3.8 Field instructorCommission
2.1.2.15.3.8.1 instructorCommission Tree Diagram
2.1.2.15.3.8.2 instructorCommission properties
PropertyValue
Name instructorCommission
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.15.3.9 Field timestamps
2.1.2.15.3.9.1 timestamps Tree Diagram
2.1.2.15.3.9.2 timestamps Hierarchy
Parent field: transactions
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
updatedAtdatefalse
2.1.2.15.3.9.3 timestamps properties
PropertyValue
Name timestamps
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.15.3.10 Field createdAt
2.1.2.15.3.10.1 createdAt Tree Diagram
2.1.2.15.3.10.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.15.3.11 Field updatedAt
2.1.2.15.3.11.1 updatedAt Tree Diagram
2.1.2.15.3.11.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.15.4 transactions JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "transactions",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "payment": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "customer": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "instructor": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "course": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "salePrice": {
            "type": "number"
        },
        "moneyConfiguration": {
            "type": "object",
            "properties": {
                "instructorCommission": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "timestamps": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "payment",
        "customer",
        "instructor",
        "course",
        "salePrice",
        "moneyConfiguration",
        "timestamps"
    ]
}
2.1.2.15.5 transactions JSON data
{
    "_id": ObjectId("ead810fa79e23d94c8cd60e3"),
    "payment": ObjectId("1085f5438aba11f7b9deff74"),
    "customer": ObjectId("977cb614912be9387c6e737d"),
    "instructor": ObjectId("3410abffeb924bd02f33ef9e"),
    "course": ObjectId("caa0bd3f7a8cec6eb912edac"),
    "salePrice": -74,
    "moneyConfiguration": {
        "instructorCommission": 14
    },
    "timestamps": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z")
    }
}
2.1.2.15.6 transactions Target Script
use online_course;

db.createCollection("transactions", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "transactions",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "payment": {
                    "bsonType": "objectId"
                },
                "customer": {
                    "bsonType": "objectId"
                },
                "instructor": {
                    "bsonType": "objectId"
                },
                "course": {
                    "bsonType": "objectId"
                },
                "salePrice": {
                    "bsonType": "number"
                },
                "moneyConfiguration": {
                    "bsonType": "object",
                    "properties": {
                        "instructorCommission": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "timestamps": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "payment",
                "customer",
                "instructor",
                "course",
                "salePrice",
                "moneyConfiguration",
                "timestamps"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.16 Collection usercourses
2.1.2.16.1 usercourses Tree Diagram
2.1.2.16.2 usercourses Properties
PropertyValue
Collection nameusercourses
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.16.3 usercourses Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk
courseobjectIdtruefk
userobjectIdtruefk
learnDetaildocumentfalse
learnUnitsarrayfalse
[0]documentfalse
unitIdobjectIdfalse
learnQuizdocumentfalse
quizobjectIdfalsefk
questionAnswersarrayfalse
[0]documentfalse
questionobjectIdtrue
answerNonumerictrue
skipQuestionsarrayfalse
[0]objectIdfalse
currentQuestionIdxnumericfalse
statusstringtrue
activeContentIdsarrayfalse
[0]stringfalse
[1]stringfalse
progressnumericfalse
archiveddocumentfalse
isArchivedbooleanfalse
timestampdatefalse
timestampsdocumenttrue
createdAtdatetrue
updatedAtdatefalse
2.1.2.16.3.1 Field _id
2.1.2.16.3.1.1 _id Tree Diagram
2.1.2.16.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required false
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.16.3.2 Field course
2.1.2.16.3.2.1 course Tree Diagram
2.1.2.16.3.2.2 course properties
PropertyValue
Name course
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to usercourses.
Cardinality 1
Default
Sample
Comments
2.1.2.16.3.3 Field user
2.1.2.16.3.3.1 user Tree Diagram
2.1.2.16.3.3.2 user properties
PropertyValue
Name user
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Relationship name fk users. to comments.
Cardinality 1
Default
Sample
Comments
2.1.2.16.3.4 Field learnDetail
2.1.2.16.3.4.1 learnDetail Tree Diagram
2.1.2.16.3.4.2 learnDetail Hierarchy
Parent field: usercourses
Child field(s):
FieldTypeReqKeyDescriptionComments
learnUnitsarrayfalse
activeContentIdsarrayfalse
progressnumericfalse
2.1.2.16.3.4.3 learnDetail properties
PropertyValue
Name learnDetail
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.5 Field learnUnits
2.1.2.16.3.5.1 learnUnits Tree Diagram
2.1.2.16.3.5.2 learnUnits Hierarchy
Parent field: learnDetail
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.16.3.5.3 learnUnits properties
PropertyValue
Name learnUnits
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.16.3.6 Field [0]
2.1.2.16.3.6.1 [0] Tree Diagram
2.1.2.16.3.6.2 [0] Hierarchy
Parent field: learnUnits
Child field(s):
FieldTypeReqKeyDescriptionComments
unitIdobjectIdfalse
learnQuizdocumentfalse
2.1.2.16.3.6.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.7 Field unitId
2.1.2.16.3.7.1 unitId Tree Diagram
2.1.2.16.3.7.2 unitId properties
PropertyValue
Name unitId
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.16.3.8 Field learnQuiz
2.1.2.16.3.8.1 learnQuiz Tree Diagram
2.1.2.16.3.8.2 learnQuiz Hierarchy
Parent field: [0]
Child field(s):
FieldTypeReqKeyDescriptionComments
quizobjectIdfalse
questionAnswersarrayfalse
skipQuestionsarrayfalse
currentQuestionIdxnumericfalse
statusstringtrue
2.1.2.16.3.8.3 learnQuiz properties
PropertyValue
Name learnQuiz
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.9 Field quiz
2.1.2.16.3.9.1 quiz Tree Diagram
2.1.2.16.3.9.2 quiz properties
PropertyValue
Name quiz
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection quizzes
Foreign field _id
Relationship type Foreign Key
Relationship name fk quizzes. to usercourses.
Cardinality 1
Default
Sample
Comments
2.1.2.16.3.10 Field questionAnswers
2.1.2.16.3.10.1 questionAnswers Tree Diagram
2.1.2.16.3.10.2 questionAnswers Hierarchy
Parent field: learnQuiz
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]documentfalse
2.1.2.16.3.10.3 questionAnswers properties
PropertyValue
Name questionAnswers
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.16.3.11 Field [0]
2.1.2.16.3.11.1 [0] Tree Diagram
2.1.2.16.3.11.2 [0] Hierarchy
Parent field: questionAnswers
Child field(s):
FieldTypeReqKeyDescriptionComments
questionobjectIdtrue
answerNonumerictrue
2.1.2.16.3.11.3 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.12 Field question
2.1.2.16.3.12.1 question Tree Diagram
2.1.2.16.3.12.2 question properties
PropertyValue
Name question
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.16.3.13 Field answerNo
2.1.2.16.3.13.1 answerNo Tree Diagram
2.1.2.16.3.13.2 answerNo properties
PropertyValue
Name answerNo
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.16.3.14 Field skipQuestions
2.1.2.16.3.14.1 skipQuestions Tree Diagram
2.1.2.16.3.14.2 skipQuestions Hierarchy
Parent field: learnQuiz
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalse
2.1.2.16.3.14.3 skipQuestions properties
PropertyValue
Name skipQuestions
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.16.3.15 Field [0]
2.1.2.16.3.15.1 [0] Tree Diagram
2.1.2.16.3.15.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.16.3.16 Field currentQuestionIdx
2.1.2.16.3.16.1 currentQuestionIdx Tree Diagram
2.1.2.16.3.16.2 currentQuestionIdx properties
PropertyValue
Name currentQuestionIdx
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.16.3.17 Field status
2.1.2.16.3.17.1 status Tree Diagram
2.1.2.16.3.17.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.16.3.18 Field activeContentIds
2.1.2.16.3.18.1 activeContentIds Tree Diagram
2.1.2.16.3.18.2 activeContentIds Hierarchy
Parent field: learnDetail
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
[1]stringfalse
2.1.2.16.3.18.3 activeContentIds properties
PropertyValue
Name activeContentIds
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.16.3.19 Field [0]
2.1.2.16.3.19.1 [0] Tree Diagram
2.1.2.16.3.19.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.16.3.20 Field [1]
2.1.2.16.3.20.1 [1] Tree Diagram
2.1.2.16.3.20.2 [1] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.16.3.21 Field progress
2.1.2.16.3.21.1 progress Tree Diagram
2.1.2.16.3.21.2 progress properties
PropertyValue
Name progress
Technical name
Activated true
Id
Field-level encryption
Type numeric
Subtype
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Unit
Min value
Excl min
Max value
Excl max
Multiple of
Divisible by
Enum
Faker function
Sample
Comments
2.1.2.16.3.22 Field archived
2.1.2.16.3.22.1 archived Tree Diagram
2.1.2.16.3.22.2 archived Hierarchy
Parent field: usercourses
Child field(s):
FieldTypeReqKeyDescriptionComments
isArchivedbooleanfalse
timestampdatefalse
2.1.2.16.3.22.3 archived properties
PropertyValue
Name archived
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.23 Field isArchived
2.1.2.16.3.23.1 isArchived Tree Diagram
2.1.2.16.3.23.2 isArchived properties
PropertyValue
Name isArchived
Technical name
Activated true
Id
Field-level encryption
Type boolean
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default false
Sample
Comments
2.1.2.16.3.24 Field timestamp
2.1.2.16.3.24.1 timestamp Tree Diagram
2.1.2.16.3.24.2 timestamp properties
PropertyValue
Name timestamp
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.16.3.25 Field timestamps
2.1.2.16.3.25.1 timestamps Tree Diagram
2.1.2.16.3.25.2 timestamps Hierarchy
Parent field: usercourses
Child field(s):
FieldTypeReqKeyDescriptionComments
createdAtdatetrue
updatedAtdatefalse
2.1.2.16.3.25.3 timestamps properties
PropertyValue
Name timestamps
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required true
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.16.3.26 Field createdAt
2.1.2.16.3.26.1 createdAt Tree Diagram
2.1.2.16.3.26.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.16.3.27 Field updatedAt
2.1.2.16.3.27.1 updatedAt Tree Diagram
2.1.2.16.3.27.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.16.4 usercourses JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "usercourses",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "course": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "user": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "learnDetail": {
            "type": "object",
            "properties": {
                "learnUnits": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "object",
                        "properties": {
                            "unitId": {
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{24}$"
                            },
                            "learnQuiz": {
                                "type": "object",
                                "properties": {
                                    "quiz": {
                                        "type": "string",
                                        "pattern": "^[a-fA-F0-9]{24}$"
                                    },
                                    "questionAnswers": {
                                        "type": "array",
                                        "additionalItems": true,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "question": {
                                                    "type": "string",
                                                    "pattern": "^[a-fA-F0-9]{24}$"
                                                },
                                                "answerNo": {
                                                    "type": "number"
                                                }
                                            },
                                            "additionalProperties": false,
                                            "required": [
                                                "question",
                                                "answerNo"
                                            ]
                                        }
                                    },
                                    "skipQuestions": {
                                        "type": "array",
                                        "additionalItems": true,
                                        "items": {
                                            "type": "string",
                                            "pattern": "^[a-fA-F0-9]{24}$"
                                        }
                                    },
                                    "currentQuestionIdx": {
                                        "type": "number"
                                    },
                                    "status": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "required": [
                                    "status"
                                ]
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "activeContentIds": {
                    "type": "array",
                    "additionalItems": true,
                    "items": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "progress": {
                    "type": "number"
                }
            },
            "additionalProperties": false
        },
        "archived": {
            "type": "object",
            "properties": {
                "isArchived": {
                    "type": "boolean",
                    "default": false
                },
                "timestamp": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false
        },
        "timestamps": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string",
                    "format": "date-time"
                },
                "updatedAt": {
                    "type": "string",
                    "format": "date-time"
                }
            },
            "additionalProperties": false,
            "required": [
                "createdAt"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "course",
        "user",
        "timestamps"
    ]
}
2.1.2.16.5 usercourses JSON data
{
    "_id": ObjectId("6259accec931b0e4e6a8a0ec"),
    "course": ObjectId("0dc8a397d913ac8babeeeefc"),
    "user": ObjectId("d41dd2dcc026ab1136cce1ee"),
    "learnDetail": {
        "learnUnits": [
            {
                "unitId": ObjectId("2e4e16e131343f728b0362e5"),
                "learnQuiz": {
                    "quiz": ObjectId("be8fe3ccda6d3b7f171f9dbc"),
                    "questionAnswers": [
                        {
                            "question": ObjectId("a97dcce44f11885b13caaf51"),
                            "answerNo": -9
                        }
                    ],
                    "skipQuestions": [
                        ObjectId("bab8babacc1aaeacbaff5d9a")
                    ],
                    "currentQuestionIdx": -96,
                    "status": "Lorem"
                }
            }
        ],
        "activeContentIds": [
            "Lorem",
            "Lorem"
        ],
        "progress": 82
    },
    "archived": {
        "isArchived": false,
        "timestamp": ISODate("2016-04-08T15:06:21.595Z")
    },
    "timestamps": {
        "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
        "updatedAt": ISODate("2016-04-08T15:06:21.595Z")
    }
}
2.1.2.16.6 usercourses Target Script
use online_course;

db.createCollection("usercourses", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "usercourses",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "course": {
                    "bsonType": "objectId"
                },
                "user": {
                    "bsonType": "objectId"
                },
                "learnDetail": {
                    "bsonType": "object",
                    "properties": {
                        "learnUnits": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "object",
                                "properties": {
                                    "unitId": {
                                        "bsonType": "objectId"
                                    },
                                    "learnQuiz": {
                                        "bsonType": "object",
                                        "properties": {
                                            "quiz": {
                                                "bsonType": "objectId"
                                            },
                                            "questionAnswers": {
                                                "bsonType": "array",
                                                "additionalItems": true,
                                                "items": {
                                                    "bsonType": "object",
                                                    "properties": {
                                                        "question": {
                                                            "bsonType": "objectId"
                                                        },
                                                        "answerNo": {
                                                            "bsonType": "number"
                                                        }
                                                    },
                                                    "additionalProperties": false,
                                                    "required": [
                                                        "question",
                                                        "answerNo"
                                                    ]
                                                }
                                            },
                                            "skipQuestions": {
                                                "bsonType": "array",
                                                "additionalItems": true,
                                                "items": {
                                                    "bsonType": "objectId"
                                                }
                                            },
                                            "currentQuestionIdx": {
                                                "bsonType": "number"
                                            },
                                            "status": {
                                                "bsonType": "string"
                                            }
                                        },
                                        "additionalProperties": false,
                                        "required": [
                                            "status"
                                        ]
                                    }
                                },
                                "additionalProperties": false
                            }
                        },
                        "activeContentIds": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": [
                                {
                                    "bsonType": "string"
                                },
                                {
                                    "bsonType": "string"
                                }
                            ]
                        },
                        "progress": {
                            "bsonType": "number"
                        }
                    },
                    "additionalProperties": false
                },
                "archived": {
                    "bsonType": "object",
                    "properties": {
                        "isArchived": {
                            "bsonType": "bool"
                        },
                        "timestamp": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false
                },
                "timestamps": {
                    "bsonType": "object",
                    "properties": {
                        "createdAt": {
                            "bsonType": "date"
                        },
                        "updatedAt": {
                            "bsonType": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "createdAt"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "course",
                "user",
                "timestamps"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});
2.1.2.17 Collection users
2.1.2.17.1 users Tree Diagram
2.1.2.17.2 users Properties
PropertyValue
Collection nameusers
Technical name
Activatedtrue
Id
$ref
Description
Databaseonline_course
Capped
Time series
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Encryption metadata
Additional propertiesfalse
Comments
2.1.2.17.3 users Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdfalsepk, dk
emailstringtrue
passwordstringtrue
statusstringtrue
rolestringtrue
profiledocumentfalse
avatarstringfalse
firstNamestringtrue
lastNamestringtrue
fullNamestringfalse
phonestringfalse
addressstringfalse
providersarrayfalse
[0]stringfalse
refreshTokenstringfalse
myCoursesdocumentfalse
wishlistarrayfalse
[0]objectIdfalsefk
cartdocumentfalse
coursesobjectIdfalsefk
createdAtdatetrue
updatedAtdatefalse
permissionTokenstringfalse
permissionTokenTimestampstringfalse
2.1.2.17.3.1 Field _id
2.1.2.17.3.1.1 _id Tree Diagram
2.1.2.17.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key true
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Sample
Comments
2.1.2.17.3.2 Field email
2.1.2.17.3.2.1 email Tree Diagram
2.1.2.17.3.2.2 email properties
PropertyValue
Name email
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.3 Field password
2.1.2.17.3.3.1 password Tree Diagram
2.1.2.17.3.3.2 password properties
PropertyValue
Name password
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.4 Field status
2.1.2.17.3.4.1 status Tree Diagram
2.1.2.17.3.4.2 status properties
PropertyValue
Name status
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.5 Field role
2.1.2.17.3.5.1 role Tree Diagram
2.1.2.17.3.5.2 role properties
PropertyValue
Name role
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.6 Field profile
2.1.2.17.3.6.1 profile Tree Diagram
2.1.2.17.3.6.2 profile Hierarchy
Parent field: users
Child field(s):
FieldTypeReqKeyDescriptionComments
avatarstringfalse
firstNamestringtrue
lastNamestringtrue
fullNamestringfalse
phonestringfalse
addressstringfalse
2.1.2.17.3.6.3 profile properties
PropertyValue
Name profile
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.17.3.7 Field avatar
2.1.2.17.3.7.1 avatar Tree Diagram
2.1.2.17.3.7.2 avatar properties
PropertyValue
Name avatar
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.8 Field firstName
2.1.2.17.3.8.1 firstName Tree Diagram
2.1.2.17.3.8.2 firstName properties
PropertyValue
Name firstName
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.9 Field lastName
2.1.2.17.3.9.1 lastName Tree Diagram
2.1.2.17.3.9.2 lastName properties
PropertyValue
Name lastName
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required true
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.10 Field fullName
2.1.2.17.3.10.1 fullName Tree Diagram
2.1.2.17.3.10.2 fullName properties
PropertyValue
Name fullName
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.11 Field phone
2.1.2.17.3.11.1 phone Tree Diagram
2.1.2.17.3.11.2 phone properties
PropertyValue
Name phone
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.12 Field address
2.1.2.17.3.12.1 address Tree Diagram
2.1.2.17.3.12.2 address properties
PropertyValue
Name address
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.13 Field providers
2.1.2.17.3.13.1 providers Tree Diagram
2.1.2.17.3.13.2 providers Hierarchy
Parent field: users
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]stringfalse
2.1.2.17.3.13.3 providers properties
PropertyValue
Name providers
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.17.3.14 Field [0]
2.1.2.17.3.14.1 [0] Tree Diagram
2.1.2.17.3.14.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.15 Field refreshToken
2.1.2.17.3.15.1 refreshToken Tree Diagram
2.1.2.17.3.15.2 refreshToken properties
PropertyValue
Name refreshToken
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.16 Field myCourses
2.1.2.17.3.16.1 myCourses Tree Diagram
2.1.2.17.3.16.2 myCourses Hierarchy
Parent field: users
Child field(s):
FieldTypeReqKeyDescriptionComments
wishlistarrayfalse
2.1.2.17.3.16.3 myCourses properties
PropertyValue
Name myCourses
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.17.3.17 Field wishlist
2.1.2.17.3.17.1 wishlist Tree Diagram
2.1.2.17.3.17.2 wishlist Hierarchy
Parent field: myCourses
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalse
2.1.2.17.3.17.3 wishlist properties
PropertyValue
Name wishlist
Technical name
Activated true
Id
Field-level encryption
Type array
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Min items
Max items
Unique items
Additional items true
Comments
2.1.2.17.3.18 Field [0]
2.1.2.17.3.18.1 [0] Tree Diagram
2.1.2.17.3.18.2 [0] properties
PropertyValue
Display name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to users.
Cardinality 1
Default
Sample
Comments
2.1.2.17.3.19 Field cart
2.1.2.17.3.19.1 cart Tree Diagram
2.1.2.17.3.19.2 cart Hierarchy
Parent field: users
Child field(s):
FieldTypeReqKeyDescriptionComments
coursesobjectIdfalse
2.1.2.17.3.19.3 cart properties
PropertyValue
Name cart
Technical name
Activated true
Id
Field-level encryption
Type document
Description
Dependencies
Required
Primary key
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
DBRef
Min Properties
Max Properties
Additional properties false
Comments
2.1.2.17.3.20 Field courses
2.1.2.17.3.20.1 courses Tree Diagram
2.1.2.17.3.20.2 courses properties
PropertyValue
Name courses
Technical name
Activated true
Id
Field-level encryption
Type objectId
Description
Dependencies
Required
Primary key
Foreign collection courses
Foreign field _id
Relationship type Foreign Key
Relationship name fk courses. to users.
Cardinality 1
Default
Sample
Comments
2.1.2.17.3.21 Field createdAt
2.1.2.17.3.21.1 createdAt Tree Diagram
2.1.2.17.3.21.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.17.3.22 Field updatedAt
2.1.2.17.3.22.1 updatedAt Tree Diagram
2.1.2.17.3.22.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Activated true
Id
Field-level encryption
Type date
Description
Dependencies
Required
Primary key false
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Default
Now
Faker function
Sample
Comments
2.1.2.17.3.23 Field permissionToken
2.1.2.17.3.23.1 permissionToken Tree Diagram
2.1.2.17.3.23.2 permissionToken properties
PropertyValue
Name permissionToken
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.3.24 Field permissionTokenTimestamp
2.1.2.17.3.24.1 permissionTokenTimestamp Tree Diagram
2.1.2.17.3.24.2 permissionTokenTimestamp properties
PropertyValue
Name permissionTokenTimestamp
Technical name
Activated true
Id
Field-level encryption
Type string
Description
Format
Pattern
Min length
Max length
Default
Enum
Required
Primary key
Dependencies
Foreign collection
Foreign field
Relationship type
Relationship name
Cardinality
Faker function
Sample
Comments
2.1.2.17.4 users JSON Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "title": "users",
    "properties": {
        "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
        },
        "email": {
            "type": "string"
        },
        "password": {
            "type": "string"
        },
        "status": {
            "type": "string"
        },
        "role": {
            "type": "string"
        },
        "profile": {
            "type": "object",
            "properties": {
                "avatar": {
                    "type": "string"
                },
                "firstName": {
                    "type": "string"
                },
                "lastName": {
                    "type": "string"
                },
                "fullName": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "address": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "firstName",
                "lastName"
            ]
        },
        "providers": {
            "type": "array",
            "additionalItems": true,
            "items": {
                "type": "string"
            }
        },
        "refreshToken": {
            "type": "string"
        },
        "myCourses": {
            "type": "object",
            "properties": {
                "wishlist": {
                    "type": "array",
                    "additionalItems": true,
                    "items": {
                        "type": "string",
                        "pattern": "^[a-fA-F0-9]{24}$"
                    }
                }
            },
            "additionalProperties": false
        },
        "cart": {
            "type": "object",
            "properties": {
                "courses": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                }
            },
            "additionalProperties": false
        },
        "createdAt": {
            "type": "string",
            "format": "date-time"
        },
        "updatedAt": {
            "type": "string",
            "format": "date-time"
        },
        "permissionToken": {
            "type": "string"
        },
        "permissionTokenTimestamp": {
            "type": "string"
        }
    },
    "additionalProperties": false,
    "required": [
        "email",
        "password",
        "status",
        "role",
        "createdAt"
    ]
}
2.1.2.17.5 users JSON data
{
    "_id": ObjectId("c3d3b1be5407edba1000afe7"),
    "email": "Lorem",
    "password": "Lorem",
    "status": "Lorem",
    "role": "Lorem",
    "profile": {
        "avatar": "Lorem",
        "firstName": "Lorem",
        "lastName": "Lorem",
        "fullName": "Lorem",
        "phone": "Lorem",
        "address": "Lorem"
    },
    "providers": [
        "Lorem"
    ],
    "refreshToken": "Lorem",
    "myCourses": {
        "wishlist": [
            ObjectId("2ae57cc11ca12281dd39c6ea")
        ]
    },
    "cart": {
        "courses": ObjectId("c9ae9b8cda7fc58c36ae9a5b")
    },
    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    "permissionToken": "Lorem",
    "permissionTokenTimestamp": "Lorem"
}
2.1.2.17.6 users Target Script
use online_course;

db.createCollection("users", {
    "capped": false,
    "validator": {
        "$jsonSchema": {
            "bsonType": "object",
            "title": "users",
            "properties": {
                "_id": {
                    "bsonType": "objectId"
                },
                "email": {
                    "bsonType": "string"
                },
                "password": {
                    "bsonType": "string"
                },
                "status": {
                    "bsonType": "string"
                },
                "role": {
                    "bsonType": "string"
                },
                "profile": {
                    "bsonType": "object",
                    "properties": {
                        "avatar": {
                            "bsonType": "string"
                        },
                        "firstName": {
                            "bsonType": "string"
                        },
                        "lastName": {
                            "bsonType": "string"
                        },
                        "fullName": {
                            "bsonType": "string"
                        },
                        "phone": {
                            "bsonType": "string"
                        },
                        "address": {
                            "bsonType": "string"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "firstName",
                        "lastName"
                    ]
                },
                "providers": {
                    "bsonType": "array",
                    "additionalItems": true,
                    "items": {
                        "bsonType": "string"
                    }
                },
                "refreshToken": {
                    "bsonType": "string"
                },
                "myCourses": {
                    "bsonType": "object",
                    "properties": {
                        "wishlist": {
                            "bsonType": "array",
                            "additionalItems": true,
                            "items": {
                                "bsonType": "objectId"
                            }
                        }
                    },
                    "additionalProperties": false
                },
                "cart": {
                    "bsonType": "object",
                    "properties": {
                        "courses": {
                            "bsonType": "objectId"
                        }
                    },
                    "additionalProperties": false
                },
                "createdAt": {
                    "bsonType": "date"
                },
                "updatedAt": {
                    "bsonType": "date"
                },
                "permissionToken": {
                    "bsonType": "string"
                },
                "permissionTokenTimestamp": {
                    "bsonType": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "email",
                "password",
                "status",
                "role",
                "createdAt"
            ]
        }
    },
    "validationLevel": "off",
    "validationAction": "warn"
});